package examples.model;

import java.util.Collection;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Performance {
    @Id
    private int id;
    @Temporal(TemporalType.DATE)
    @Column(name="_date")
    private Date date;
    
    @OneToMany
    Collection<Seat> seats;

    public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Show getShow() {
		return show;
	}

	public void setShow(Show show) {
		this.show = show;
	}

	public Collection<Seat> getSeats() {
		return seats;
	}

	@ManyToOne
    Show show;

    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }

	public static Collection<Performance> findPerformanceByShowName(
			String showName) {
		// TODO Auto-generated method stub
		return null;
	}
}
